using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace XiaoMan.Model.Models.Mapping
{
    public class Sys_GiftMap : EntityTypeConfiguration<Sys_Gift>
    {
        public Sys_GiftMap()
        {
            // Primary Key
            this.HasKey(t => t.GiftID);

            // Properties
            this.Property(t => t.GiftName)
                .HasMaxLength(50);

            this.Property(t => t.GiftIcon)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("Sys_Gift");
            this.Property(t => t.GiftID).HasColumnName("GiftID");
            this.Property(t => t.GiftName).HasColumnName("GiftName");
            this.Property(t => t.GiftIcon).HasColumnName("GiftIcon");
            this.Property(t => t.GiftMoney).HasColumnName("GiftMoney");
        }
    }
}
